This notebook builds from "DECALS low-SB_completeness AnaK overlap"


In [1]:
from __future__ import print_function, division

In [2]:
# This changes the current directory to the base saga directory - make sure to run this first!
# This is necessary to be able to import the py files and use the right directories,
# while keeping all the notebooks in their own directory.
import os
import sys
from time import time

if 'saga_base_dir' not in locals():
    saga_base_dir = os.path.abspath('..')
if saga_base_dir not in sys.path:
    os.chdir(saga_base_dir)

In [3]:
import hosts
import targeting

import numpy as np

from scipy import interpolate

from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy import table
from astropy.table import Table
from astropy.io import fits

from astropy.utils.console import ProgressBar

from collections import Counter

In [4]:
%matplotlib inline
from matplotlib import style, pyplot as plt

plt.style.use('seaborn-deep')
plt.rcParams['image.cmap'] = 'viridis'
plt.rcParams['image.origin'] = 'lower'
plt.rcParams['figure.figsize'] = (14, 8)
plt.rcParams['axes.titlesize'] =  plt.rcParams['axes.labelsize'] = 16
plt.rcParams['xtick.labelsize'] =  plt.rcParams['ytick.labelsize'] = 14

In [5]:
from IPython import display

In [6]:
from decals import make_cutout_comparison_table, fluxivar_to_mag_magerr, compute_sb

Get AnaK/brick info


In [7]:
hsts = hosts.get_saga_hosts_from_google(clientsecretjsonorfn='client_secrets.json', useobservingsummary=False)
anak  = [h for h in hsts if h.name=='AnaK']
assert len(anak)==1
anak = anak[0]


Using cached version of google hosts list from file "hosts_dl.pkl2"

In [8]:
bricknames = []
with open('decals_dr3/anakbricks') as f:
    for l in f:
        l = l.strip()
        if l != '':
            bricknames.append(l)
print(bricknames)


['3538m007', '3541m007', '3543m007', '3546m007', '3533m005', '3536m005', '3538m005', '3541m005', '3543m005', '3546m005', '3548m005', '3531m002', '3533m002', '3536m002', '3538m002', '3541m002', '3543m002', '3546m002', '3548m002', '3551m002', '3531p000', '3533p000', '3536p000', '3538p000', '3541p000', '3543p000', '3546p000', '3548p000', '3551p000', '3531p002', '3533p002', '3536p002', '3538p002', '3541p002', '3543p002', '3546p002', '3548p002', '3551p002', '3531p005', '3533p005', '3536p005', '3538p005', '3541p005', '3543p005', '3546p005', '3548p005', '3551p005', '3531p007', '3533p007', '3536p007', '3538p007', '3541p007', '3543p007', '3546p007', '3548p007', '3551p007', '3533p010', '3536p010', '3538p010', '3541p010', '3543p010', '3546p010', '3548p010', '3536p012', '3538p012', '3541p012', '3543p012', '3546p012']

Download the catalogs if needed


In [9]:
base_url = 'http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr3/tractor/{first3}/tractor-{brickname}.fits'

for brickname in ProgressBar(bricknames, ipython_widget=True):
    url = base_url.format(brickname=brickname, first3=brickname[:3])
    target = os.path.join('decals_dr3/catalogs/', url.split('/')[-1])
    if not os.path.isfile(target):
        !wget $url -O $target
    else:
        print(target, 'already exists, not downloading')


decals_dr3/catalogs/tractor-3538m007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3541m007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3543m007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3546m007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3533m005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3536m005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3538m005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3541m005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3543m005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3546m005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3548m005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3531m002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3533m002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3536m002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3538m002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3541m002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3543m002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3546m002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3548m002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3551m002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3531p000.fits already exists, not downloading
decals_dr3/catalogs/tractor-3533p000.fits already exists, not downloading
decals_dr3/catalogs/tractor-3536p000.fits already exists, not downloading
decals_dr3/catalogs/tractor-3538p000.fits already exists, not downloading
decals_dr3/catalogs/tractor-3541p000.fits already exists, not downloading
decals_dr3/catalogs/tractor-3543p000.fits already exists, not downloading
decals_dr3/catalogs/tractor-3546p000.fits already exists, not downloading
decals_dr3/catalogs/tractor-3548p000.fits already exists, not downloading
decals_dr3/catalogs/tractor-3551p000.fits already exists, not downloading
decals_dr3/catalogs/tractor-3531p002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3533p002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3536p002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3538p002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3541p002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3543p002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3546p002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3548p002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3551p002.fits already exists, not downloading
decals_dr3/catalogs/tractor-3531p005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3533p005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3536p005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3538p005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3541p005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3543p005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3546p005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3548p005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3551p005.fits already exists, not downloading
decals_dr3/catalogs/tractor-3531p007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3533p007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3536p007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3538p007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3541p007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3543p007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3546p007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3548p007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3551p007.fits already exists, not downloading
decals_dr3/catalogs/tractor-3533p010.fits already exists, not downloading
decals_dr3/catalogs/tractor-3536p010.fits already exists, not downloading
decals_dr3/catalogs/tractor-3538p010.fits already exists, not downloading
decals_dr3/catalogs/tractor-3541p010.fits already exists, not downloading
decals_dr3/catalogs/tractor-3543p010.fits already exists, not downloading
decals_dr3/catalogs/tractor-3546p010.fits already exists, not downloading
decals_dr3/catalogs/tractor-3548p010.fits already exists, not downloading
decals_dr3/catalogs/tractor-3536p012.fits already exists, not downloading
decals_dr3/catalogs/tractor-3538p012.fits already exists, not downloading
decals_dr3/catalogs/tractor-3541p012.fits already exists, not downloading
decals_dr3/catalogs/tractor-3543p012.fits already exists, not downloading
decals_dr3/catalogs/tractor-3546p012.fits already exists, not downloading

Load the catalogs


In [10]:
bricks = Table.read('decals_dr3/survey-bricks.fits.gz')
bricksdr3 = Table.read('decals_dr3/survey-bricks-dr3.fits.gz')

In [11]:
catalog_fns = ['decals_dr3/catalogs/tractor-{}.fits'.format(bnm) for bnm in bricknames]
decals_catalogs = [Table.read(fn) for fn in catalog_fns]
dcatall = table.vstack(decals_catalogs, metadata_conflicts='silent')


WARNING: UnitsWarning: '1/deg^2' did not parse as fits unit: Numeric factor not supported by FITS [astropy.units.core]
WARNING:astropy:UnitsWarning: '1/deg^2' did not parse as fits unit: Numeric factor not supported by FITS
WARNING: UnitsWarning: 'nanomaggy' did not parse as fits unit: At col 0, Unit 'nanomaggy' not supported by the FITS standard.  [astropy.units.core]
WARNING:astropy:UnitsWarning: 'nanomaggy' did not parse as fits unit: At col 0, Unit 'nanomaggy' not supported by the FITS standard. 
WARNING: UnitsWarning: '1/nanomaggy^2' did not parse as fits unit: Numeric factor not supported by FITS [astropy.units.core]
WARNING:astropy:UnitsWarning: '1/nanomaggy^2' did not parse as fits unit: Numeric factor not supported by FITS
WARNING: UnitsWarning: '1/arcsec^2' did not parse as fits unit: Numeric factor not supported by FITS [astropy.units.core]
WARNING:astropy:UnitsWarning: '1/arcsec^2' did not parse as fits unit: Numeric factor not supported by FITS

In [12]:
sdss_catalog = Table.read('catalogs/base_sql_nsa{}.fits.gz'.format(anak.nsaid))

In [13]:
#cut out the non-overlap region
dsc = SkyCoord(dcatall['ra'], dcatall['dec'], unit=u.deg)
dcutall = dcatall[dsc.separation(anak.coords) < 1*u.deg]

Populate additional info in the DECaLS tables


In [14]:
ap_sizes = [0.5,0.75,1.0,1.5,2.0,3.5,5.0,7.0] * u.arcsec

In [15]:
for dcat in [dcutall]:
    for magnm, idx in zip('grz', [1, 2, 4]):
        mag, mag_err = fluxivar_to_mag_magerr(dcat['decam_flux'][:, 1], dcat['decam_flux_ivar'][:, idx])
        dcat[magnm] = mag
        dcat[magnm + '_err'] = mag_err
    
    dcat['sb_r_0.5'] = compute_sb(0.5*u.arcsec, dcat['decam_apflux'][:, 2, :])
    dcat['sb_r_0.75'] = compute_sb(0.75*u.arcsec, dcat['decam_apflux'][:, 2, :])
    dcat['sb_r_1'] = compute_sb(1.0*u.arcsec, dcat['decam_apflux'][:, 2, :])
    dcat['sb_r_2'] = compute_sb(2.0*u.arcsec, dcat['decam_apflux'][:, 2, :])


/Users/erik/miniconda3/envs/saga/lib/python2.7/site-packages/ipykernel/__main__.py:11: RuntimeWarning: divide by zero encountered in log10
/Users/erik/miniconda3/envs/saga/lib/python2.7/site-packages/ipykernel/__main__.py:11: RuntimeWarning: invalid value encountered in log10
/Users/erik/miniconda3/envs/saga/lib/python2.7/site-packages/ipykernel/__main__.py:12: RuntimeWarning: divide by zero encountered in log10
/Users/erik/miniconda3/envs/saga/lib/python2.7/site-packages/ipykernel/__main__.py:12: RuntimeWarning: invalid value encountered in log10
/Users/erik/miniconda3/envs/saga/lib/python2.7/site-packages/ipykernel/__main__.py:13: RuntimeWarning: divide by zero encountered in log10
/Users/erik/miniconda3/envs/saga/lib/python2.7/site-packages/ipykernel/__main__.py:13: RuntimeWarning: invalid value encountered in log10
/Users/erik/miniconda3/envs/saga/lib/python2.7/site-packages/ipykernel/__main__.py:8: RuntimeWarning: divide by zero encountered in log10
/Users/erik/miniconda3/envs/saga/lib/python2.7/site-packages/ipykernel/__main__.py:8: RuntimeWarning: invalid value encountered in log10

Experiment with Masks


In [16]:
MASK_BITS = {0: 'detector bad pixel/no data',
             1: 'saturated',
             2: 'interpolated',
             4: 'single exposure cosmic ray',
             6: 'bleed trail',
             7: 'multi-exposure transient',
             8: 'edge',
             9: 'edge2',
             10: 'longthin'}
def maskarr_to_boolarrs(arr):
    boolarrs = {}
    for bnum, name in MASK_BITS.items():
        boolarrs[name] = (arr & 10**bnum)!=0
    return boolarrs

In [17]:
anymaskr = maskarr_to_boolarrs(dcutall['decam_anymask'][:, 2])
allmaskr = maskarr_to_boolarrs(dcutall['decam_allmask'][:, 2])

In [18]:
nper = 10

Any pixels?


In [19]:
for name, barr in anymaskr.items():
    print(name)
    idxs = np.random.permutation(np.sum(barr))[:nper]
    display.display(make_cutout_comparison_table(dcutall[barr][idxs], doprint=False))


longthin
obj DECALS SDSS
334664_2110
RA=354.1556
Dec=0.4542
r=25.04
sb=25.44
anymsk=[ 0 0 1024 0 0 0]
allmsk=[0 0 0 0 0 0]
334663_2274
RA=353.9664
Dec=0.4609
r=24.29
sb=25.21
anymsk=[ 0 0 1537 0 0 0]
allmsk=[0 0 0 0 0 0]
334665_1589
RA=354.3837
Dec=0.4417
r=24.24
sb=24.99
anymsk=[ 0 1 1024 0 1 0]
allmsk=[0 0 0 0 0 0]
334665_1564
RA=354.4223
Dec=0.4401
r=24.75
sb=25.38
anymsk=[ 0 0 1025 0 1 0]
allmsk=[0 0 0 0 0 0]
334665_1593
RA=354.3725
Dec=0.4417
r=24.28
sb=25.05
anymsk=[ 0 0 1024 0 1 0]
allmsk=[0 0 0 0 0 0]
334664_2167
RA=354.1081
Dec=0.4549
r=24.60
sb=25.38
anymsk=[ 0 0 1024 0 0 0]
allmsk=[0 0 0 0 0 0]
337543_4576
RA=353.7505
Dec=1.0493
r=23.84
sb=24.67
anymsk=[ 0 0 1024 0 0 0]
allmsk=[0 0 0 0 0 0]
334664_2309
RA=354.0929
Dec=0.4608
r=24.93
sb=25.50
anymsk=[ 0 0 1537 0 0 0]
allmsk=[0 0 0 0 0 0]
334665_1733
RA=354.4130
Dec=0.4490
r=18.90
sb=19.75
anymsk=[ 0 0 1024 0 0 0]
allmsk=[0 0 0 0 0 0]
336108_1486
RA=355.0468
Dec=0.6854
r=23.90
sb=25.00
anymsk=[ 0 0 1024 0 0 0]
allmsk=[0 0 0 0 0 0]
saturated
obj DECALS SDSS
334664_444
RA=354.1322
Dec=0.3898
r=18.48
sb=17.82
anymsk=[ 0 128 70 0 71 0]
allmsk=[0 0 0 0 0 0]
328906_5866
RA=354.5134
Dec=-0.3964
r=15.12
sb=17.04
anymsk=[ 0 0 78 0 1094 0]
allmsk=[0 0 0 0 0 0]
336107_3823
RA=354.7990
Dec=0.7564
r=15.32
sb=17.23
anymsk=[0 0 3 0 3 0]
allmsk=[0 0 0 0 0 0]
330342_3605
RA=353.5575
Dec=-0.2291
r=14.16
sb=18.32
anymsk=[0 2 2 0 2 0]
allmsk=[0 0 2 0 2 0]
337541_592
RA=353.3381
Dec=0.8952
r=15.43
sb=16.91
anymsk=[0 0 3 0 2 0]
allmsk=[0 0 0 0 2 0]
331784_5791
RA=354.1804
Dec=0.0970
r=14.66
sb=18.69
anymsk=[ 0 70 583 0 70 0]
allmsk=[0 0 0 0 2 0]
334663_792
RA=353.9962
Dec=0.4019
r=20.15
sb=18.23
anymsk=[ 0 0 70 0 70 0]
allmsk=[ 0 0 0 0 64 0]
337546_1684
RA=354.6930
Dec=0.9431
r=15.30
sb=16.63
anymsk=[ 0 0 201 0 70 0]
allmsk=[0 0 0 0 0 0]
331787_846
RA=354.8216
Dec=-0.0952
r=15.50
sb=16.72
anymsk=[ 0 0 131 0 70 0]
allmsk=[0 0 0 0 0 0]
328904_2039
RA=354.0585
Dec=-0.5565
r=15.30
sb=16.93
anymsk=[0 0 2 0 2 0]
allmsk=[0 0 0 0 0 0]
bleed trail
obj DECALS SDSS
331787_2736
RA=354.7744
Dec=-0.0180
r=24.33
sb=25.45
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
334661_3748
RA=353.4563
Dec=0.5265
r=24.61
sb=25.15
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
331781_3326
RA=353.3595
Dec=0.0082
r=23.94
sb=24.83
anymsk=[ 0 0 513 0 513 0]
allmsk=[0 0 0 0 0 0]
337544_3923
RA=354.0509
Dec=1.0197
r=23.88
sb=24.77
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
331788_3627
RA=355.0838
Dec=0.0058
r=24.20
sb=25.41
anymsk=[ 0 0 513 0 513 0]
allmsk=[0 0 0 0 0 0]
337546_1981
RA=354.5866
Dec=0.9533
r=24.59
sb=25.63
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
337543_3496
RA=353.9299
Dec=1.0038
r=22.30
sb=23.11
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
337545_2139
RA=354.4344
Dec=0.9544
r=24.76
sb=25.68
anymsk=[ 0 0 641 0 0 0]
allmsk=[0 0 0 0 0 0]
331785_3812
RA=354.2975
Dec=0.0316
r=25.45
sb=25.69
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
331785_3402
RA=354.3805
Dec=0.0154
r=25.12
sb=25.55
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
interpolated
obj DECALS SDSS
331783_3913
RA=353.8800
Dec=0.0220
r=23.74
sb=25.81
anymsk=[ 0 0 64 0 0 0]
allmsk=[0 0 0 0 0 0]
336100_2639
RA=353.2346
Dec=0.7274
r=17.36
sb=18.45
anymsk=[ 0 2 70 0 70 0]
allmsk=[0 2 2 0 2 0]
337542_5979
RA=353.7465
Dec=1.1010
r=13.87
sb=18.50
anymsk=[ 0 10 70 0 70 0]
allmsk=[0 0 2 0 2 0]
330342_2886
RA=353.6898
Dec=-0.2622
r=18.67
sb=17.70
anymsk=[ 0 64 66 0 2 0]
allmsk=[0 0 0 0 0 0]
336102_391
RA=353.5723
Dec=0.6438
r=13.03
sb=18.20
anymsk=[ 0 70 70 0 70 0]
allmsk=[0 2 2 0 2 0]
328903_720
RA=353.8344
Dec=-0.5956
r=24.88
sb=26.03
anymsk=[0 0 5 0 1 0]
allmsk=[0 0 0 0 0 0]
331781_1741
RA=353.4207
Dec=-0.0559
r=24.69
sb=25.37
anymsk=[0 0 5 0 1 0]
allmsk=[0 0 0 0 0 0]
338983_880
RA=353.8706
Dec=1.1660
r=26.44
sb=26.62
anymsk=[0 0 5 0 5 0]
allmsk=[0 0 0 0 0 0]
333221_1451
RA=353.3875
Dec=0.1760
r=24.59
sb=25.23
anymsk=[ 0 1 64 0 64 0]
allmsk=[0 0 0 0 0 0]
336102_2487
RA=353.6287
Dec=0.7304
r=13.48
sb=18.46
anymsk=[ 0 70 70 0 70 0]
allmsk=[0 0 2 0 2 0]
edge2
obj DECALS SDSS
334661_3138
RA=353.3096
Dec=0.5014
r=22.68
sb=23.42
anymsk=[ 0 0 513 0 641 0]
allmsk=[0 0 0 0 0 0]
338985_386
RA=354.4105
Dec=1.1425
r=24.11
sb=24.92
anymsk=[ 0 1 641 0 641 0]
allmsk=[0 0 0 0 0 0]
337541_2708
RA=353.4618
Dec=0.9783
r=19.71
sb=21.25
anymsk=[ 0 1 513 0 513 0]
allmsk=[0 0 0 0 0 0]
331784_42
RA=354.1795
Dec=-0.1297
r=23.13
sb=24.71
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
331787_967
RA=354.7761
Dec=-0.0928
r=24.38
sb=25.21
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
334661_996
RA=353.3906
Dec=0.4146
r=24.20
sb=25.61
anymsk=[ 0 0 513 0 1 0]
allmsk=[0 0 0 0 0 0]
328904_3940
RA=354.0340
Dec=-0.4862
r=21.93
sb=22.63
anymsk=[ 0 0 641 0 657 0]
allmsk=[0 0 0 0 0 0]
331783_2393
RA=353.9353
Dec=-0.0333
r=21.15
sb=22.42
anymsk=[ 0 0 517 0 0 0]
allmsk=[0 0 0 0 0 0]
337546_2377
RA=354.7159
Dec=0.9695
r=23.95
sb=25.04
anymsk=[ 0 1 513 0 0 0]
allmsk=[0 0 0 0 0 0]
337545_3108
RA=354.4540
Dec=0.9939
r=23.55
sb=24.69
anymsk=[ 0 0 513 0 513 0]
allmsk=[0 0 0 0 0 0]
edge
obj DECALS SDSS
334667_1859
RA=354.9880
Dec=0.4528
r=23.42
sb=24.77
anymsk=[ 0 0 256 0 0 0]
allmsk=[0 0 0 0 0 0]
334667_1906
RA=354.9937
Dec=0.4530
r=24.44
sb=25.53
anymsk=[ 0 0 256 0 0 0]
allmsk=[0 0 0 0 0 0]
334668_1512
RA=355.0193
Dec=0.4526
r=22.60
sb=24.08
anymsk=[ 0 0 256 0 0 0]
allmsk=[0 0 0 0 0 0]
334668_1500
RA=355.0387
Dec=0.4523
r=24.56
sb=25.49
anymsk=[ 0 0 256 0 0 0]
allmsk=[0 0 0 0 0 0]
338983_1748
RA=353.7859
Dec=1.2031
r=23.57
sb=24.58
anymsk=[ 0 0 261 0 0 0]
allmsk=[0 0 0 0 0 0]
334668_1511
RA=355.0734
Dec=0.4525
r=24.05
sb=25.24
anymsk=[ 0 0 256 0 0 0]
allmsk=[0 0 0 0 0 0]
334668_1523
RA=355.0990
Dec=0.4535
r=24.87
sb=26.26
anymsk=[ 0 0 256 0 0 0]
allmsk=[0 0 0 0 0 0]
334667_1860
RA=354.9865
Dec=0.4533
r=24.62
sb=25.56
anymsk=[ 0 0 256 0 0 0]
allmsk=[0 0 0 0 0 0]
334668_1520
RA=355.0400
Dec=0.4531
r=24.08
sb=25.80
anymsk=[ 0 0 256 0 16 0]
allmsk=[0 0 0 0 0 0]
334668_1515
RA=355.0056
Dec=0.4526
r=24.39
sb=26.17
anymsk=[ 0 0 256 0 0 0]
allmsk=[0 0 0 0 0 0]
multi-exposure transient
obj DECALS SDSS
337543_2336
RA=353.9508
Dec=0.9547
r=21.67
sb=23.55
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
331781_2124
RA=353.3101
Dec=-0.0393
r=20.27
sb=22.01
anymsk=[ 0 0 128 0 1024 0]
allmsk=[0 0 0 0 0 0]
334661_5748
RA=353.2612
Dec=0.6106
r=24.36
sb=25.60
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
334667_2980
RA=354.8740
Dec=0.4997
r=23.92
sb=24.68
anymsk=[ 0 0 513 0 513 0]
allmsk=[0 0 0 0 0 0]
337544_3166
RA=354.2263
Dec=0.9942
r=24.30
sb=24.82
anymsk=[ 0 0 513 0 641 0]
allmsk=[0 0 0 0 0 0]
334667_6025
RA=354.9932
Dec=0.6240
r=19.53
sb=20.48
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
334666_2662
RA=354.5938
Dec=0.4765
r=24.18
sb=25.10
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
334666_641
RA=354.5734
Dec=0.3991
r=24.68
sb=25.16
anymsk=[ 0 0 144 0 0 0]
allmsk=[0 0 0 0 0 0]
331787_917
RA=354.7518
Dec=-0.0952
r=24.17
sb=25.15
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
336102_4950
RA=353.6434
Dec=0.8139
r=24.22
sb=25.30
anymsk=[ 0 1 513 0 0 0]
allmsk=[0 0 0 0 0 0]
single exposure cosmic ray
obj DECALS SDSS
334663_4038
RA=353.8489
Dec=0.5261
r=25.18
sb=26.06
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
337545_4432
RA=354.3576
Dec=1.0475
r=24.58
sb=25.27
anymsk=[ 0 0 144 0 1 0]
allmsk=[0 0 0 0 0 0]
333225_1750
RA=354.3294
Dec=0.1830
r=26.17
sb=26.53
anymsk=[ 0 0 16 0 0 0]
allmsk=[0 0 0 0 0 0]
337544_3321
RA=354.1438
Dec=1.0009
r=24.99
sb=25.60
anymsk=[ 0 1 513 0 513 0]
allmsk=[0 0 0 0 0 0]
337546_2540
RA=354.5036
Dec=0.9779
r=24.64
sb=25.81
anymsk=[ 0 0 513 0 513 0]
allmsk=[0 0 0 0 0 0]
337544_2212
RA=354.0353
Dec=0.9547
r=22.49
sb=23.59
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
337544_2023
RA=354.1209
Dec=0.9548
r=23.47
sb=24.75
anymsk=[ 0 0 641 0 0 0]
allmsk=[0 0 0 0 0 0]
336102_111
RA=353.7059
Dec=0.6289
r=24.53
sb=25.20
anymsk=[ 0 0 16 0 0 0]
allmsk=[0 0 0 0 0 0]
334667_3147
RA=354.7651
Dec=0.5077
r=24.14
sb=24.86
anymsk=[ 0 0 513 0 513 0]
allmsk=[0 0 0 0 0 0]
331787_2721
RA=354.9934
Dec=-0.0181
r=23.20
sb=24.29
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
detector bad pixel/no data
obj DECALS SDSS
333223_2743
RA=353.9207
Dec=0.2311
r=24.91
sb=25.51
anymsk=[0 0 1 0 0 0]
allmsk=[0 0 0 0 0 0]
334665_520
RA=354.2784
Dec=0.3874
r=23.82
sb=25.03
anymsk=[0 1 1 0 0 0]
allmsk=[0 0 0 0 0 0]
336102_77
RA=353.5544
Dec=0.6257
r=24.72
sb=25.39
anymsk=[ 0 0 513 0 0 0]
allmsk=[0 0 0 0 0 0]
330341_3680
RA=353.3112
Dec=-0.2424
r=24.87
sb=25.73
anymsk=[0 1 1 0 0 0]
allmsk=[0 0 0 0 0 0]
333222_2028
RA=353.4965
Dec=0.2012
r=24.17
sb=25.23
anymsk=[0 1 1 0 0 0]
allmsk=[0 0 0 0 0 0]
331787_4057
RA=354.9309
Dec=0.0380
r=24.11
sb=24.97
anymsk=[0 0 1 0 0 0]
allmsk=[0 0 0 0 0 0]
337547_1039
RA=354.9154
Dec=0.9091
r=23.44
sb=24.18
anymsk=[0 0 1 0 0 0]
allmsk=[0 0 0 0 0 0]
336101_2513
RA=353.4076
Dec=0.7255
r=23.24
sb=24.10
anymsk=[0 0 1 0 0 0]
allmsk=[0 0 0 0 0 0]
333222_3018
RA=353.5203
Dec=0.2459
r=23.39
sb=24.72
anymsk=[0 0 1 0 0 0]
allmsk=[0 0 0 0 0 0]
336103_4724
RA=353.9329
Dec=0.7964
r=19.79
sb=22.15
anymsk=[0 1 1 0 1 0]
allmsk=[0 0 0 0 0 0]

All pixels?


In [20]:
for name, barr in allmaskr.items():
    print(name)
    idxs = np.random.permutation(np.sum(barr))[:nper]
    display.display(make_cutout_comparison_table(dcutall[barr][idxs], doprint=False))


longthin
obj DECALS SDSS
saturated
obj DECALS SDSS
331785_1880
RA=354.3395
Dec=-0.0399
r=13.58
sb=18.35
anymsk=[ 0 70 70 0 70 0]
allmsk=[0 0 2 0 2 0]
333227_520
RA=354.9626
Dec=0.1528
r=13.79
sb=18.69
anymsk=[0 2 2 0 2 0]
allmsk=[0 0 2 0 2 0]
331782_6085
RA=353.6824
Dec=0.1302
r=10.89
sb=17.34
anymsk=[0 2 2 0 2 0]
allmsk=[0 2 2 0 2 0]
333225_3155
RA=354.4155
Dec=0.2426
r=11.79
sb=17.69
anymsk=[0 2 2 0 2 0]
allmsk=[0 2 2 0 2 0]
334663_2052
RA=353.8050
Dec=0.4546
r=14.42
sb=18.70
anymsk=[ 0 0 70 0 70 0]
allmsk=[0 0 2 0 2 0]
331787_5814
RA=354.9261
Dec=0.1230
r=12.76
sb=18.12
anymsk=[ 0 70 70 0 70 0]
allmsk=[0 2 2 0 2 0]
336101_4959
RA=353.4648
Dec=0.8230
r=13.77
sb=19.28
anymsk=[0 2 2 0 2 0]
allmsk=[0 0 2 0 2 0]
337546_5564
RA=354.6109
Dec=1.1110
r=11.82
sb=17.57
anymsk=[ 0 70 70 0 70 0]
allmsk=[0 2 2 0 2 0]
334663_710
RA=353.8068
Dec=0.3990
r=17.98
sb=18.99
anymsk=[ 0 64 70 0 70 0]
allmsk=[0 0 2 0 2 0]
334668_21
RA=355.0673
Dec=0.3692
r=14.12
sb=17.38
anymsk=[0 2 2 0 3 0]
allmsk=[0 0 2 0 0 0]
bleed trail
obj DECALS SDSS
331784_5792
RA=354.1808
Dec=0.0967
r=18.49
sb=19.04
anymsk=[ 0 192 68 0 68 0]
allmsk=[ 0 0 64 0 64 0]
328904_4528
RA=354.1219
Dec=-0.4593
r=18.78
sb=18.79
anymsk=[ 0 192 70 0 70 0]
allmsk=[ 0 0 64 0 64 0]
331785_1667
RA=354.5014
Dec=-0.0496
r=nan
sb=24.98
anymsk=[ 0 64 68 0 68 0]
allmsk=[ 0 0 64 0 64 0]
336100_1918
RA=353.2434
Dec=0.6970
r=19.41
sb=18.82
anymsk=[ 0 0 68 0 68 0]
allmsk=[ 0 0 64 0 64 0]
330345_2310
RA=354.3258
Dec=-0.2776
r=17.33
sb=19.31
anymsk=[ 0 0 64 0 64 0]
allmsk=[ 0 0 64 0 0 0]
330345_2312
RA=354.3262
Dec=-0.2778
r=18.70
sb=20.91
anymsk=[ 0 0 64 0 64 0]
allmsk=[ 0 0 64 0 0 0]
333225_2690
RA=354.3686
Dec=0.2182
r=19.28
sb=19.52
anymsk=[ 0 0 64 0 64 0]
allmsk=[ 0 0 64 0 0 0]
333221_187
RA=353.2572
Dec=0.1284
r=17.62
sb=19.98
anymsk=[ 0 1 64 0 64 0]
allmsk=[ 0 0 64 0 64 0]
333227_5496
RA=354.8156
Dec=0.3721
r=nan
sb=18.88
anymsk=[ 0 1 64 0 66 0]
allmsk=[ 0 0 64 0 0 0]
333222_769
RA=353.5311
Dec=0.1541
r=18.05
sb=18.75
anymsk=[ 0 64 64 0 64 0]
allmsk=[ 0 0 64 0 64 0]
interpolated
obj DECALS SDSS
331784_5792
RA=354.1808
Dec=0.0967
r=18.49
sb=19.04
anymsk=[ 0 192 68 0 68 0]
allmsk=[ 0 0 64 0 64 0]
334663_356
RA=353.8795
Dec=0.3846
r=21.41
sb=18.99
anymsk=[ 0 0 68 0 70 0]
allmsk=[ 0 0 64 0 0 0]
336106_2059
RA=354.5170
Dec=0.7027
r=19.75
sb=18.53
anymsk=[ 0 0 64 0 3 0]
allmsk=[ 0 0 64 0 0 0]
333221_2203
RA=353.3474
Dec=0.2132
r=18.73
sb=20.56
anymsk=[ 0 64 64 0 0 0]
allmsk=[ 0 0 64 0 0 0]
333222_769
RA=353.5311
Dec=0.1541
r=18.05
sb=18.75
anymsk=[ 0 64 64 0 64 0]
allmsk=[ 0 0 64 0 64 0]
328905_1719
RA=354.4686
Dec=-0.5567
r=17.83
sb=18.80
anymsk=[ 0 64 64 0 64 0]
allmsk=[ 0 64 64 0 64 0]
334665_4989
RA=354.5037
Dec=0.5801
r=15.76
sb=17.13
anymsk=[ 0 64 64 0 64 0]
allmsk=[ 0 0 64 0 64 0]
336106_5873
RA=354.7010
Dec=0.8778
r=16.89
sb=18.49
anymsk=[ 0 0 64 0 66 0]
allmsk=[ 0 0 64 0 0 0]
328903_4637
RA=353.8294
Dec=-0.4450
r=17.42
sb=18.60
anymsk=[ 0 128 70 0 70 0]
allmsk=[ 0 0 64 0 0 0]
333221_187
RA=353.2572
Dec=0.1284
r=17.62
sb=19.98
anymsk=[ 0 1 64 0 64 0]
allmsk=[ 0 0 64 0 64 0]
edge2
obj DECALS SDSS
edge
obj DECALS SDSS
multi-exposure transient
obj DECALS SDSS
single exposure cosmic ray
obj DECALS SDSS
328904_465
RA=354.0317
Dec=-0.6150
r=23.19
sb=24.39
anymsk=[ 0 0 16 0 0 0]
allmsk=[ 0 0 16 0 0 0]
detector bad pixel/no data
obj DECALS SDSS
328905_549
RA=354.3570
Dec=-0.6076
r=25.00
sb=26.29
anymsk=[0 0 1 0 0 0]
allmsk=[0 0 1 0 0 0]